package com.ecoolex.chinadutyfree.retailer.ws;

import java.math.BigDecimal;
import java.util.Date;

import com.ecoolex.chinadutyfree.retailer.entity.Coupon;
import com.ecoolex.chinadutyfree.retailer.entity.CouponClass;
import com.ecoolex.chinadutyfree.retailer.entity.CouponClassExpireStrategy;
import com.ecoolex.chinadutyfree.retailer.entity.CouponVerifyingConsumption;
import com.ecoolex.chinadutyfree.retailer.pojo.EditCouponClassStep;
import com.ecoolex.chinadutyfree.retailer.pojo.QueryCouponClassDTO;
import com.ecoolex.chinadutyfree.retailer.pojo.QueryCouponDTO;
import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;

public interface CouponService {

	Pagination<CouponClass> queryCouponClass(QueryCouponClassDTO query, Page page);
	
	Pagination<CouponClass> queryCouponClassForUser(Page page);

	CouponClass getCouponClassById(Integer couponClassId);

	Boolean deleteCouponClass(CouponClass couponClass, String updateUser);
	
	CouponClass updateCouponClassStep(EditCouponClassStep step, String updateUser) throws BizException;
	
	Boolean onlineCouponClass(CouponClass couponClass, String updateUser);

	Boolean invalidCouponClass(CouponClass couponClass, String updateUser);
	
	Boolean updateCouponClassProvideNumber(CouponClass couponClass, Integer newProvideNumber, String updateUser);

	CouponClassExpireStrategy getCouponClassExpireStrategyById(Integer couponClassId);
	
	Coupon getByUserIdAndCouponClassId(Integer userId,Integer couponClassId);
	
	Coupon receiveCoupon(Integer couponClassId,Integer userId,String createUser) throws BizException;
	
	Pagination<Coupon> couponList(Integer userId,Page page);
	
	Pagination<Coupon> couponList(QueryCouponDTO query,Sorting[] sorts,Page page);
	
	CouponVerifyingConsumption getCouponVerifyingConsumptionByCouponId(Integer couponId);
	
	Boolean checkCoupon(Date createTime,BigDecimal realPrice,Integer couponId);
}
